<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // 注：'use strict'是在某个作用域的顶层添加。作用于它所添加到的这个作用域。
        console.log(this)// window
        let a = () => {
            console.log(this, 'a')// Window
        }
        a()
        /* 严格模式 */
        function go() {
            'use strict'
            console.log(this)// undefined
            const b = ()=>{
                console.log(this,'b')// undefined
            }
            a()
            b()
        }
        go();
        const obj = {
            a: 1,
            fn() {
                console.log(this)// obj
            }
        }
        obj.fn()
    </script>
</body>

</html>